All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class quicktime.util.EndianDescriptor

java.lang.Object
   |
   +----quicktime.util.EndianDescriptor

public class EndianDescriptor
extends Object
An EndianDescriptor is used to describe the flipping requirements of a particular data-structure. It has three modes which are determined by the format flag which is provided in the constructor: An application can build EndianDescriptor objects for any custom data structures that require endian flipping for consistency between platforms with different endian orders and data files (like the QuickTime Movie File) that generally require data to have a particular endian format.

The EndianDescriptor objects is used with the QTUtils.endianFlip calls or the platform sensitive EndianOrder.flip... methods.


Variable Index

 o flipAll16
This object is used to describe data that should be flipped around 16bit size.
 o flipAll32
This object is used to describe data that should be flipped around 32bit size.
 o flipAll64
This object is used to describe data that should be flipped around 64bit size.
 o kFlipAllFields16
Describes the modal state of the EndianDescriptor object.
 o kFlipAllFields32
Describes the modal state of the EndianDescriptor object.
 o kFlipAllFields64
Describes the modal state of the EndianDescriptor object.
 o kFlipNoFields
Describes the modal state of the EndianDescriptor object.
 o kFlipSpecifiedFields
Describes the modal state of the EndianDescriptor object.

Constructor Index

 o EndianDescriptor(int)
Create an EndianDescriptor class with the supplied format.

Method Index

 o addFlipSpec(EndianFlipSpec)
An EndianDescriptor with the format kFlipSpecifiedFields, typically describes data that is not contiguous in size of location.
 o flipSpecs()
Returns an Enumeration to iterate over the collection of EndianFlipSpecs or null if there is no collection to iterate over
 o getFlipSpec(int)
Returns an EndianFlipSpec at the specified offset, or null if no flip spec is found in the collection at that offset.
 o getFormatFlag()
Returns the format of the EndianDescriptor object - which determines the behaviour of the descriptor when used with the endianFlip methods.
 o removeFlipSpec(EndianFlipSpec)
Removes a specified EndianFlipSpec (if found) from the EndianDescriptor.
 o toString()
Return a String representation of this object.

Variables

 o kFlipSpecifiedFields
 public static final int kFlipSpecifiedFields
Describes the modal state of the EndianDescriptor object. Only when an EndianDescriptor's format is kFlipSpecifiedFields can EndianFlipSpec objects be added

 o kFlipAllFields16
 public static final int kFlipAllFields16
Describes the modal state of the EndianDescriptor object. Only when an EndianDescriptor's format is kFlipSpecifiedFields can EndianFlipSpec objects be added

 o kFlipAllFields32
 public static final int kFlipAllFields32
Describes the modal state of the EndianDescriptor object. Only when an EndianDescriptor's format is kFlipSpecifiedFields can EndianFlipSpec objects be added

 o kFlipAllFields64
 public static final int kFlipAllFields64
Describes the modal state of the EndianDescriptor object. Only when an EndianDescriptor's format is kFlipSpecifiedFields can EndianFlipSpec objects be added

 o kFlipNoFields
 public static final int kFlipNoFields
Describes the modal state of the EndianDescriptor object. Only when an EndianDescriptor's format is kFlipSpecifiedFields can EndianFlipSpec objects be added

 o flipAll16
 public static final EndianDescriptor flipAll16
This object is used to describe data that should be flipped around 16bit size.

 o flipAll32
 public static final EndianDescriptor flipAll32
This object is used to describe data that should be flipped around 32bit size.

 o flipAll64
 public static final EndianDescriptor flipAll64
This object is used to describe data that should be flipped around 64bit size.

Constructors

 o EndianDescriptor
 public EndianDescriptor(int formatFlag)
Create an EndianDescriptor class with the supplied format.

Parameters:
formatFlag - specifies the mode of the EndianDescriptor object.

Methods

 o getFormatFlag
 public int getFormatFlag()
Returns the format of the EndianDescriptor object - which determines the behaviour of the descriptor when used with the endianFlip methods.

Returns:
an int
 o addFlipSpec
 public void addFlipSpec(EndianFlipSpec spec)
An EndianDescriptor with the format kFlipSpecifiedFields, typically describes data that is not contiguous in size of location. As such a more complex description of the flipping requirements of this data must be built, and the addition of EndianFlipSpecs is used to describe these requirements. In this case an EndianDescriptor becomes a collection of EndianFlipSpec objects that completely describe the flipping requirements of the target data object.

EndianFlipSpecs are ordered in an EndianDescriptor by the offset of these EndianFlipSpecs. When a candidate EndianFlipSpec is added to an EndianDescriptor object it will only be added if it's offset is unique in the descriptor's collection of flip spec members. If the offset already exists in the collection the new object is not added and an exception is thrown.

If and only if the format of the EndianDescriptor is kFlipSpecifiedFields can an EndianFlipSpec be added to the EndianDescriptor.

Parameters:
spec - the new spec to add to the EndianDescriptor's collection.
 o removeFlipSpec
 public void removeFlipSpec(EndianFlipSpec member)
Removes a specified EndianFlipSpec (if found) from the EndianDescriptor.

 o getFlipSpec
 public EndianFlipSpec getFlipSpec(int offset)
Returns an EndianFlipSpec at the specified offset, or null if no flip spec is found in the collection at that offset.

Parameters:
offset - the offset of the desired EndianFlipSpec
Returns:
the EndianFlipSpec with the specified offset value or null if no spec with that offset value
 o flipSpecs
 public Enumeration flipSpecs()
Returns an Enumeration to iterate over the collection of EndianFlipSpecs or null if there is no collection to iterate over

 o toString
 public String toString()
Return a String representation of this object.

Returns:
a String
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index